<?php
/**
 * @file archive.php
 * @package V2
 * @subpackage 
 * @version $id: 0.1 UTF-8 2009-8-5 下午07:44:25 $
 * @author LD King (mifunny.info)
 * @copyright Copyright (c) 2007 - 2009 MiFunny China Inc. (http://mifunny.info)
 */
get_header();
?>
<div id="adsSingleTop">
	<iframe marginwidth="0" marginheight="0" allowtransparency="" src="<?php echo WP_SITEURL; ?>/v2/js/ads-single-top.html" frameborder="0" height="90" width="950" scrolling="no" align="center,center"></iframe>
</div>

<div class="bodyer" style="margin: 10px auto 0pt;">
<div class="bodyleft">

<div class="tabtitle"><div class="tab1">商品分类</div></div>
<div class="tabshow">
<div class="clall">
    <div class="clshow">
    <ul>
 <li><a href="<?php echo WP_SITEURL; ?>/category/special/"  title="专题活动">专题活动</a></li>
<li><a href="<?php echo WP_SITEURL; ?>/category/special/brand/"  title="潮人品牌" style="color: rgb(235, 94, 0);">潮人品牌</a> </li>
<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/grocer/"  title="小七杂货铺">小七杂货铺</a></li>
<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/hot/"  title="热门推荐" style="color: rgb(235, 97, 0);"><strong>热门推荐</strong></a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/girls/" title="女装/女士精品">女装/女士精品</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/boys/" title="男装/流行男鞋">男装/流行男鞋</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/shoes-bag/" title="女鞋/箱包皮具">女鞋/箱包皮具</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/sports/" title="运动鞋/运动服/运动配件">运动鞋/运动服/运动配件</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/jewelry/" title="流行首饰/时尚饰品">流行首饰/时尚饰品</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/underwear/" title="女士内衣/男士内衣/家居服">女士内衣/男士内衣/家居服</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/home-daily/" title="居家日用/厨房餐饮/卫浴洗浴">居家日用/厨房餐饮/卫浴洗浴</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/beauty-care/" title="彩妆/美容护肤">彩妆/美容护肤</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/baby/" title="童装/母婴用品">童装/母婴用品</a></li>
	<li><a href="<?php echo WP_SITEURL; ?>/category/cornucopia/food/" title="食品/茶叶/零食/特产">食品/茶叶/零食/特产</a></li>
</ul>
</div></div></div>
<!--/class -->

		<?php if (have_posts()) : ?>

 	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
 	  <?php /* If this is a category archive */ if (is_category()) { ?>
		<h2 class="pagetitle">分类: <?php single_cat_title(); ?></h2>
 	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
		<h2 class="pagetitle">标签: <?php single_tag_title(); ?></h2>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2 class="pagetitle"> <?php the_time('F jS, Y'); ?> 的存档</h2>
 	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2 class="pagetitle"> <?php the_time('F, Y'); ?> 的存档</h2>
 	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2 class="pagetitle"> <?php the_time('Y'); ?> 的存档</h2>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h2 class="pagetitle">伙计页面</h2>
 	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2 class="pagetitle">商品汇总</h2>
 	  <?php } ?>
<div class="navigation"><?php previous_posts_link('&laquo; 上一页') ?> | <?php next_posts_link('下一页 &raquo;') ?></div>
<table class="tbkList">
 	  	<?php while (have_posts()) : the_post(); ?>
<tr>
<td><?php $pic = get_post_meta($post->ID, 'pic_url', true);
	if (empty($pic)) { ?>
	<img src="<?php echo WP_SITEURL; ?>/v2/images/noimage.jpg" title="图片在商品页中..." alt="no image 暂无图片" height="150px" width="150px" />
	<?php }else{ ?>
	<img src="<?php echo $pic; ?>" title="<?php the_title_attribute(); ?>" alt="<?php the_title_attribute(); ?>" height="150px" width="150px" />
	<?php } ?>
</td>
<td>
	<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
	<?php the_excerpt(); ?> (<small><?php the_time('l, F jS, Y') ?></small>)
</td>
<td>
	<div class=lbbtn><a href="<?php the_permalink() ?>" target=_blank>去看看</a></div>
</td>
</tr>
		<?php endwhile; ?>
</table>
<div class="navigation"><?php previous_posts_link('&laquo; 上一页') ?> | <?php next_posts_link('下一页 &raquo;') ?></div>
	<?php else :

		if ( is_category() ) { // If this is a category archive
			printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false));
		} else if ( is_date() ) { // If this is a date archive
			echo("<h2>Sorry, but there aren't any posts with this date.</h2>");
		} else if ( is_author() ) { // If this is a category archive
			$userdata = get_userdatabylogin(get_query_var('author_name'));
			printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);
		} else {
			echo("<h2 class='center'>No posts found.</h2>");
		}
		get_search_form();

	endif;
?>
</div><!-- .bright -->

<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>

</div><!-- .bodyer -->

<?php include (TEMPLATEPATH . '/footer2.php'); ?>